<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>1027上课动态表格</title>
	</head>
	<body>
		<table border="1" cellpadding="0" cellspacing="0">
			<tr>
				<td>12</td>
				<td>12</td>
				<td>12</td>
				<td>12</td>
				<td>12</td>
			</tr>
			
		</table>
		
		<br>
		<br>
		<br>
		<br>
		<br>
		账号：<input type="text" name="" id="" value="" /><br>
		密码：<input type="password" name="" id="" value="" /><br>
		<input type="submit" name="" id="" value="登录" /><br>
		<!-- <button type="button" onclick="alert('登陆成功')">登录</button> -->
		<button id="bu">登录</button>
		
		
		
		
		<script>
			var but=document.getElementById("bu");
			//鼠标单击事件 
			//but.onclick=function(){alert("登陆成功！");}		
			
			//双击事件
			//but.ondblclick=function(){alert("双击事件");}
			
			//鼠标按下事件
			//but.onmousedown=function(){alert("鼠标按下事件");}
			
			// 鼠标松开事件
			but.onmouseup=function(){alert("鼠标松开事件");}
			
			
			
			
			
			var tb=document.getElementsByTagName("table")[0];
			tb.innerHTML="<tr><td>12</td><td>12</td><td>12</td><td>12</td><td>12</td></tr>"+
			"<tr><td>12</td><td>12</td><td>12</td><td>12</td><td>12</td></tr>"+
			"<tr><td>12</td><td>12</td><td>12</td><td>12</td><td>12</td></tr>";
			var tbs=document.getElementsByTagName("tr");
			tbs[0].style.backgroundColor="azure";
			tbs[1].style.backgroundColor="cornflowerblue";
			tbs[2].style.backgroundColor="aliceblue";
			
		</script>
		
	</body>
</html>
